package com.kitty.quartz;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class QuartzJob {
    /**
     * 定时一小时执行一次
     * */
    @Scheduled(cron="0 0 */1 * * *") 
    public void buildOnTimer(){
    	 System.out.println("1h");
    }
    
    @Scheduled(cron="*/10 * * * * *") 
    public void s10(){
        System.out.println("10s");
    }
    
    @Scheduled(cron="0 */1 * * * *") 
    public void m1(){
        System.out.println("1m");
    }
    @Scheduled(cron="0 0 */1 * * *") 
    public void h1(){
        System.out.println("1h");
    }
}
